#include <stdio.h>

#define IN  1   /*  在单词内  */
#define OUT 0   /*  在单词外  */

main() {
    int state = OUT, c;

    while ((c = getchar()) != EOF) {
        if (c == ' ' || c == '\n' || c == '\t') {
            state = OUT;
            putchar('\n');
        } else {
            putchar(c);
        }
    }
}
    